package com.fs.web;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;


//开启服务注册与发现
@EnableDiscoveryClient
//开启Feign调用接口
@EnableFeignClients
//开启断路器
@EnableCircuitBreaker
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
public class FSWebApplication implements CommandLineRunner {


    public static void main(String[] args) throws Exception{
        SpringApplication app = new SpringApplication(FSWebApplication.class);
        app.run(args);
    }

    //程序首次启动调用
    public void run(String... strings) throws Exception {
        System.out.println("Web-Application Server Boot Successfully");
    }
}
